home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Sample Player
- */
-
- #include <proto/exec.h>
- #include <proto/dos.h>
- #include <dos/dostags.h>
- #include <clib/datatypes_protos.h>
- #include <clib/alib_protos.h>
- #include <datatypes/datatypes.h>
- #include <datatypes/datatypesclass.h>
- #include <datatypes/soundclass.h>
- struct Library *DataTypesBase;
-
- void snd_Play(void);
- void snd_spawn(void (*func)(void));
- void __asm __saveds snd_play(void);
-
-
- main()
- {
- snd_Play();
- }
-
-
- void snd_Play(void)
- {
- snd_spawn(snd_play);
-
-
- }
-
-
- void snd_spawn(void (*func)(void))
- {
- CreateNewProcTags(NP_Entry,func,TAG_DONE);
- }
-
-
- void __asm __saveds snd_play(void)
- {
- struct Library *DataTypesBase;
- Object *sound;
- struct dtTrigger trigger;
-
- DataTypesBase = OpenLibrary("datatypes.library",0);
-
-
-
- if ((sound=NewDTObject("PROGDIR:Message.wav", DTA_GroupID, GID_SOUND, TAG_DONE))==0) return;
-
- trigger.MethodID = DTM_TRIGGER;
- trigger.dtt_GInfo = NULL;
- trigger.dtt_Function = STM_PLAY;
- trigger.dtt_Data = NULL;
- DoDTMethodA(sound,0L,0L,(Msg)&trigger);
-
-
-
-
-
- DisposeDTObject(sound);
- }
-